home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Utilities Experience
/
The Utilities Experience - Volume 1.iso
/
software
/
comms
/
thor_2.22
/
thor.lha
/
rexx
/
UUJoin.thor
< prev
next >
Wrap
Text File
|
1995-12-18
|
945b
|
50 lines
/* UUJoin.thor by Troels Walsted Hansen
** $VER: UUJoin.thor v1.0 (28.05.95)
**
** An ARexx script that saves parts of a split uuencoded file to a
** tmpfile. When you have appended the last part, UUDecode.thor will
** decode the file.
*/
options results
/* needs THOR functions */
p = address() || ' ' || show('P',,)
thorport = pos('THOR.',p)
if thorport > 0 then thorport = word(substr(p,thorport),1)
else
do
say 'No THOR port found!'
exit 10
end
address(thorport)
/* save the message to a tmp file */
LOCKGUI
msgfilename = 'T:JoinedUUEncodedFile.tmp'
SAVEMESSAGE CURRENT FILENAME msgfilename NOHEADER NOANSI
if(rc ~= 0) then
do
REQUESTNOTIFY TEXT '"'THOR.LASTERROR'"' BT '"_Ok"'
UNLOCKGUI
exit
end
UNLOCKGUI
/* ask whether this was the last part */
REQUESTNOTIFY TEXT '"Was this the last part?"' BT '"_Yes|_No"'
if(result = 1) then
do
address command
"rx `GetEnv THOR/THORPath`Rexx/UUDecode.thor " || msgfilename
end
exit